;Assembler header file for DrawFile
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:11:42 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 21 Aug 1995

        [       :LNOT: :DEF: DrawFile_Hdr
        GBLS    DrawFile_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_OSSpriteOp
        GBLS    Get_OSSpriteOp
        ]
        [       :LNOT: :DEF: OSSpriteOp_Hdr
Get_OSSpriteOp                  SETS    "GET oslib/OSSpriteOp.Hdr"
        |
Get_OSSpriteOp                  SETS    ""
        ]
        $Get_OSSpriteOp

        [       :LNOT: :DEF: Get_Draw
        GBLS    Get_Draw
        ]
        [       :LNOT: :DEF: Draw_Hdr
Get_Draw                        SETS    "GET oslib/Draw.Hdr"
        |
Get_Draw                        SETS    ""
        ]
        $Get_Draw

        [       :LNOT: :DEF: Get_Font
        GBLS    Get_Font
        ]
        [       :LNOT: :DEF: Font_Hdr
Get_Font                        SETS    "GET oslib/Font.Hdr"
        |
Get_Font                        SETS    ""
        ]
        $Get_Font

        [       :LNOT: :DEF: Get_Wimp
        GBLS    Get_Wimp
        ]
        [       :LNOT: :DEF: Wimp_Hdr
Get_Wimp                        SETS    "GET oslib/Wimp.Hdr"
        |
Get_Wimp                        SETS    ""
        ]
        $Get_Wimp

        [       :LNOT: :DEF: Get_JPEG
        GBLS    Get_JPEG
        ]
        [       :LNOT: :DEF: JPEG_Hdr
Get_JPEG                        SETS    "GET oslib/JPEG.Hdr"
        |
Get_JPEG                        SETS    ""
        ]
        $Get_JPEG

;Symbols for constants
Error_DrawFileNotDraw           *       &20C00
Error_DrawFileVersion           *       &20C01
Error_DrawFileFontTab           *       &20C02
Error_DrawFileBadFontNo         *       &20C03
Error_DrawFileBadMode           *       &20C04
Error_DrawFileBadFile           *       &20C05
Error_DrawFileBadGroup          *       &20C06
Error_DrawFileBadTag            *       &20C07
Error_DrawFileSyntax            *       &20C08
Error_DrawFileFontNo            *       &20C09
Error_DrawFileAreaVer           *       &20C0A
Error_DrawFileNoAreaVer         *       &20C0B
DrawFile_TypeFontTable          *       &0
DrawFile_TypeText               *       &1
DrawFile_TypePath               *       &2
DrawFile_TypeSprite             *       &5
DrawFile_TypeGroup              *       &6
DrawFile_TypeTagged             *       &7
DrawFile_TypeTextArea           *       &9
DrawFile_TypeTextColumn         *       &A
DrawFile_TypeOptions            *       &B
DrawFile_TypeTrfmText           *       &C
DrawFile_TypeTrfmSprite         *       &D
DrawFile_TypeJPEG               *       &10
DrawFile_PathMitred             *       &0
DrawFile_PathRound              *       &1
DrawFile_PathBevelled           *       &2
DrawFile_PathButt               *       &0
DrawFile_PathSquare             *       &2
DrawFile_PathTriangle           *       &3
DrawFile_PathJoinShift          *       0
DrawFile_PathJoin               *       &3
DrawFile_PathEndShift           *       2
DrawFile_PathEnd                *       &C
DrawFile_PathStartShift         *       4
DrawFile_PathStart              *       &30
DrawFile_PathWindingEvenOdd     *       &40
DrawFile_PathDashed             *       &80
DrawFile_PathCapWidthShift      *       16
DrawFile_PathCapWidth           *       &FF0000
DrawFile_PathCapLengthShift     *       24
DrawFile_PathCapLength          *       &FF000000
DrawFile_TextKern               *       &1
DrawFile_TextRightToLeft        *       &2
DrawFile_TextUnderline          *       &4
DrawFile_RenderBBoxes           *       &1
DrawFile_RenderSuppress         *       &2
DrawFile_RenderGivenFlatness    *       &4
DrawFile_RenderGivenColourMapping *       &8
DrawFile_NoDownload             *       &1
DrawFile_PaperShow              *       &1
DrawFile_PaperLandscape         *       &10
DrawFile_PaperDefault           *       &100
DrawFile_EntryModeLine          *       &1
DrawFile_EntryModeClosedLine    *       &2
DrawFile_EntryModeCurve         *       &4
DrawFile_EntryModeClosedCurve   *       &8
DrawFile_EntryModeRectangle     *       &10
DrawFile_EntryModeEllipse       *       &20
DrawFile_EntryModeTextLine      *       &40
DrawFile_EntryModeSelect        *       &80

;Symbols for structure offsets and sizes
                                ^       0
                                #       Int
DrawFile_Type                   *       @

                                ^       0
                                #       Byte
DrawFile_PathStyleFlags         *       @

                                ^       0
                                #       Bits
DrawFile_TextFlags              *       @

                                ^       0
                                #       Bits
DrawFile_RenderFlags            *       @

                                ^       0
                                #       Bits
DrawFile_DeclareFontsFlags      *       @

                                ^       0
                                #       Bits
DrawFile_PaperOptions           *       @

                                ^       0
                                #       Bits
DrawFile_EntryMode              *       @

                                ^       0
DrawFile_FontDef_font_index     #       Byte
DrawFile_FontDef_font_name      #       Char
DrawFile_FontDef                *       @
        
        MACRO
$label                          DrawFile_FontDef_MEMBERS
$label._font_index              #       Byte
        MEND
        
                                ^       0
DrawFile_FontDefBase            DrawFile_FontDef_MEMBERS
DrawFile_FontDefBase            *       @

                                ^       0
DrawFile_TextStyle_font_index   #       Byte
DrawFile_TextStyle_reserved     #       3*Byte
DrawFile_TextStyle              *       @

                                ^       0
DrawFile_PathStyle_flags        #       DrawFile_PathStyleFlags
DrawFile_PathStyle_reserved     #       Byte
DrawFile_PathStyle_cap_width    #       Byte
DrawFile_PathStyle_cap_length   #       Byte
DrawFile_PathStyle              *       @

                                ^       0
DrawFile_FontTable_font_def     #       DrawFile_FontDef
DrawFile_FontTable              *       @

                                ^       0
DrawFile_Text_bbox              #       OS_Box
DrawFile_Text_fill              #       OS_Colour
DrawFile_Text_bg_hint           #       OS_Colour
DrawFile_Text_style             #       DrawFile_TextStyle
DrawFile_Text_xsize             #       Int
DrawFile_Text_ysize             #       Int
DrawFile_Text_base              #       OS_Coord
DrawFile_Text_text              #       Char
DrawFile_Text                   *       @
        
        MACRO
$label                          DrawFile_Text_MEMBERS
$label._bbox                    #       OS_Box
$label._fill                    #       OS_Colour
$label._bg_hint                 #       OS_Colour
$label._style                   #       DrawFile_TextStyle
$label._xsize                   #       Int
$label._ysize                   #       Int
$label._base                    #       OS_Coord
        MEND
        
                                ^       0
DrawFile_TextBase               DrawFile_Text_MEMBERS
DrawFile_TextBase               *       @

                                ^       0
DrawFile_Path_bbox              #       OS_Box
DrawFile_Path_fill              #       OS_Colour
DrawFile_Path_outline           #       OS_Colour
DrawFile_Path_width             #       Int
DrawFile_Path_style             #       DrawFile_PathStyle
DrawFile_Path_path              #       Draw_Path
DrawFile_Path                   *       @

                                ^       0
DrawFile_PathWithPattern_bbox   #       OS_Box
DrawFile_PathWithPattern_fill   #       OS_Colour
DrawFile_PathWithPattern_outline #       OS_Colour
DrawFile_PathWithPattern_width  #       Int
DrawFile_PathWithPattern_style  #       DrawFile_PathStyle
DrawFile_PathWithPattern_pattern #       Draw_DashPattern
DrawFile_PathWithPattern_path   #       Draw_Path
DrawFile_PathWithPattern        *       @

                                ^       0
DrawFile_Sprite_bbox            #       OS_Box
DrawFile_Sprite_header          #       OSSpriteOp_Header
DrawFile_Sprite_data            #       Byte
DrawFile_Sprite                 *       @
        
        MACRO
$label                          DrawFile_Sprite_MEMBERS
$label._bbox                    #       OS_Box
$label._header                  #       OSSpriteOp_Header
        MEND
        
                                ^       0
DrawFile_SpriteBase             DrawFile_Sprite_MEMBERS
DrawFile_SpriteBase             *       @

                                ^       0
DrawFile_Group_bbox             #       OS_Box
DrawFile_Group_name             #       12*Char
DrawFile_Group_objects          #       Int
DrawFile_Group                  *       @
        
        MACRO
$label                          DrawFile_Group_MEMBERS
$label._bbox                    #       OS_Box
$label._name                    #       12*Char
        MEND
        
                                ^       0
DrawFile_GroupBase              DrawFile_Group_MEMBERS
DrawFile_GroupBase              *       @

                                ^       0
DrawFile_Tagged_bbox            #       OS_Box
DrawFile_Tagged_tag             #       DrawFile_Type
DrawFile_Tagged_object          #       Int
DrawFile_Tagged                 *       @
        
        MACRO
$label                          DrawFile_Tagged_MEMBERS
$label._bbox                    #       OS_Box
$label._tag                     #       DrawFile_Type
        MEND
        
                                ^       0
DrawFile_TaggedBase             DrawFile_Tagged_MEMBERS
DrawFile_TaggedBase             *       @

                                ^       0
DrawFile_TextColumn_box         #       OS_Box
DrawFile_TextColumn             *       @

                                ^       0
DrawFile_TextColumnList_columns_type #       DrawFile_Type
DrawFile_TextColumnList_columns_size #       Int
DrawFile_TextColumnList_columns_data #       DrawFile_TextColumn
DrawFile_TextColumnList         *       @

                                ^       0
DrawFile_AreaText_type          #       DrawFile_Type
DrawFile_AreaText_reserved      #       2*Int
DrawFile_AreaText_fill          #       OS_Colour
DrawFile_AreaText_bg_hint       #       OS_Colour
DrawFile_AreaText_text          #       Char
DrawFile_AreaText               *       @
        
        MACRO
$label                          DrawFile_AreaText_MEMBERS
$label._type                    #       DrawFile_Type
$label._reserved                #       2*Int
$label._fill                    #       OS_Colour
$label._bg_hint                 #       OS_Colour
        MEND
        
                                ^       0
DrawFile_AreaTextBase           DrawFile_AreaText_MEMBERS
DrawFile_AreaTextBase           *       @

                                ^       0
DrawFile_TextArea_bbox          #       OS_Box
DrawFile_TextArea_header        #       DrawFile_TextColumnList
DrawFile_TextArea_area_text     #       DrawFile_AreaText
DrawFile_TextArea               *       @

                                ^       0
DrawFile_Options_bbox           #       OS_Box
DrawFile_Options_paper_size     #       Int
DrawFile_Options_paper_options  #       DrawFile_PaperOptions
DrawFile_Options_grid_spacing   #       Double
DrawFile_Options_grid_division  #       Int
DrawFile_Options_isometric      #       Bool
DrawFile_Options_auto_adjust    #       Bool
DrawFile_Options_show           #       Bool
DrawFile_Options_lock           #       Bool
DrawFile_Options_cm             #       Bool
DrawFile_Options_zoom_mul       #       Int
DrawFile_Options_zoom_div       #       Int
DrawFile_Options_zoom_lock      #       Bool
DrawFile_Options_toolbox        #       Bool
DrawFile_Options_entry_mode     #       DrawFile_EntryMode
DrawFile_Options_undo_size      #       Int
DrawFile_Options                *       @

                                ^       0
DrawFile_TrfmText_bbox          #       OS_Box
DrawFile_TrfmText_trfm          #       OS_Trfm
DrawFile_TrfmText_flags         #       DrawFile_TextFlags
DrawFile_TrfmText_fill          #       OS_Colour
DrawFile_TrfmText_bg_hint       #       OS_Colour
DrawFile_TrfmText_style         #       DrawFile_TextStyle
DrawFile_TrfmText_xsize         #       Int
DrawFile_TrfmText_ysize         #       Int
DrawFile_TrfmText_base          #       OS_Coord
DrawFile_TrfmText_text          #       Char
DrawFile_TrfmText               *       @
        
        MACRO
$label                          DrawFile_TrfmText_MEMBERS
$label._bbox                    #       OS_Box
$label._trfm                    #       OS_Trfm
$label._flags                   #       DrawFile_TextFlags
$label._fill                    #       OS_Colour
$label._bg_hint                 #       OS_Colour
$label._style                   #       DrawFile_TextStyle
$label._xsize                   #       Int
$label._ysize                   #       Int
$label._base                    #       OS_Coord
        MEND
        
                                ^       0
DrawFile_TrfmTextBase           DrawFile_TrfmText_MEMBERS
DrawFile_TrfmTextBase           *       @

                                ^       0
DrawFile_TrfmSprite_bbox        #       OS_Box
DrawFile_TrfmSprite_trfm        #       OS_Trfm
DrawFile_TrfmSprite_header      #       OSSpriteOp_Header
DrawFile_TrfmSprite_data        #       Byte
DrawFile_TrfmSprite             *       @
        
        MACRO
$label                          DrawFile_TrfmSprite_MEMBERS
$label._bbox                    #       OS_Box
$label._trfm                    #       OS_Trfm
$label._header                  #       OSSpriteOp_Header
        MEND
        
                                ^       0
DrawFile_TrfmSpriteBase         DrawFile_TrfmSprite_MEMBERS
DrawFile_TrfmSpriteBase         *       @

                                ^       0
DrawFile_JPEG_bbox              #       OS_Box
DrawFile_JPEG_width             #       Int
DrawFile_JPEG_height            #       Int
DrawFile_JPEG_xdpi              #       Int
DrawFile_JPEG_ydpi              #       Int
DrawFile_JPEG_trfm              #       OS_Trfm
DrawFile_JPEG_len               #       Int
DrawFile_JPEG_image             #       JPEG_Image
DrawFile_JPEG                   *       @

                                ^       0
DrawFile_Object_type            #       DrawFile_Type
DrawFile_Object_size            #       Int
DrawFile_Object_data            *       @
DrawFile_Object_data_font_table #       DrawFile_FontTable
                                ^       DrawFile_Object_data
DrawFile_Object_data_text       #       DrawFile_Text
                                ^       DrawFile_Object_data
DrawFile_Object_data_path       #       DrawFile_Path
                                ^       DrawFile_Object_data
DrawFile_Object_data_path_with_pattern #       DrawFile_PathWithPattern
                                ^       DrawFile_Object_data
DrawFile_Object_data_sprite     #       DrawFile_Sprite
                                ^       DrawFile_Object_data
DrawFile_Object_data_group      #       DrawFile_Group
                                ^       DrawFile_Object_data
DrawFile_Object_data_tagged     #       DrawFile_Tagged
                                ^       DrawFile_Object_data
DrawFile_Object_data_text_column #       DrawFile_TextColumn
                                ^       DrawFile_Object_data
DrawFile_Object_data_text_area  #       DrawFile_TextArea
                                ^       DrawFile_Object_data
DrawFile_Object_data_options    #       DrawFile_Options
                                ^       DrawFile_Object_data
DrawFile_Object_data_trfm_text  #       DrawFile_TrfmText
                                ^       DrawFile_Object_data
DrawFile_Object_data_trfm_sprite #       DrawFile_TrfmSprite
                                ^       DrawFile_Object_data
DrawFile_Object_data_jpeg       #       DrawFile_JPEG
DrawFile_Object                 *       @

                                ^       0
DrawFile_Diagram_tag            #       4*Char
DrawFile_Diagram_major_version  #       Int
DrawFile_Diagram_minor_version  #       Int
DrawFile_Diagram_source         #       12*Char
DrawFile_Diagram_bbox           #       OS_Box
DrawFile_Diagram_objects        #       DrawFile_Object
DrawFile_Diagram                *       @
        
        MACRO
$label                          DrawFile_Diagram_MEMBERS
$label._tag                     #       4*Char
$label._major_version           #       Int
$label._minor_version           #       Int
$label._source                  #       12*Char
$label._bbox                    #       OS_Box
        MEND
        
                                ^       0
DrawFile_DiagramBase            DrawFile_Diagram_MEMBERS
DrawFile_DiagramBase            *       @

                                ^       0
                                #       Bits
DrawFile_BBoxFlags              *       @

                                ^       0
DrawFile_RenderState_object     #       Ptr
DrawFile_RenderState_diagram    #       Ptr
DrawFile_RenderState_font_table #       Ptr
DrawFile_RenderState_flags      #       DrawFile_RenderFlags
DrawFile_RenderState_trfm       #       Ptr
DrawFile_RenderState_clip       #       Ptr
DrawFile_RenderState_flatness   #       Int
DrawFile_RenderState_error      #       Ptr
DrawFile_RenderState_mapping    #       Ptr
DrawFile_RenderState            *       @

                                ^       0
DrawFile_DeclareFontsState_object #       Ptr
DrawFile_DeclareFontsState_diagram #       Ptr
DrawFile_DeclareFontsState_font_table #       Ptr
DrawFile_DeclareFontsState_flags #       DrawFile_DeclareFontsFlags
DrawFile_DeclareFontsState_error #       Ptr
DrawFile_DeclareFontsState      *       @


;Symbols for SWI's and SWI reason codes
XDrawFile_Render                *       &65540
DrawFile_Render                 *       &45540
   ;Entry
   ;  R0 = flags (DrawFile_RenderFlags)
   ;  R1 -> diagram (DrawFile_Diagram)
   ;  R2 = size (Int)
   ;  R3 -> trfm (OS_Trfm)
   ;  R4 -> clip (OS_Box)
   ;  R5 = flatness (Int)

XDrawFile_RenderMapped          *       &65540
DrawFile_RenderMapped           *       &45540
   ;Entry
   ;  R0 = &8 :OR: flags (DrawFile_RenderFlags)
   ;  R1 -> diagram (DrawFile_Diagram)
   ;  R2 = size (Int)
   ;  R3 -> trfm (OS_Trfm)
   ;  R4 -> clip (OS_Box)
   ;  R5 = flatness (Int)
   ;  R6 -> mapping (OSSpriteOp_ColourMapping)

XDrawFile_BBox                  *       &65541
DrawFile_BBox                   *       &45541
   ;Entry
   ;  R0 = flags (DrawFile_BBoxFlags)
   ;  R1 -> diagram (DrawFile_Diagram)
   ;  R2 = size (Int)
   ;  R3 -> trfm (OS_Trfm)
   ;  R4 = bbox (pointer to OS_Box)

XDrawFile_DeclareFonts          *       &65542
DrawFile_DeclareFonts           *       &45542
   ;Entry
   ;  R0 = flags (DrawFile_DeclareFontsFlags)
   ;  R1 -> diagram (DrawFile_Diagram)
   ;  R2 = size (Int)

Service_DrawObjectRender        *       &45540
   ;Entry
   ;  R0 = type (DrawFile_Type)
   ;  R1 = &45540
   ;  R2 = state (pointer to DrawFile_RenderState)
   ;Exit
   ;  R1 = unclaimed (Bool)

Service_DrawObjectDeclareFonts  *       &45541
   ;Entry
   ;  R0 = type (DrawFile_Type)
   ;  R1 = &45541
   ;  R2 = state (pointer to DrawFile_DeclareFontsState)
   ;Exit
   ;  R1 = unclaimed (Bool)

        ]
        END
